-
Notifications
You must be signed in to change notification settings - Fork 1.6k
diagnostics: improve logging of hcs helper utilities on debug builds #13971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances diagnostic capabilities for HCS/HNS operations by adding debug-only tracing and improving error messages. The changes include adding WSL_LOG_DEBUG calls to key functions, optimizing static data caching with std::call_once, and improving error message formatting.
Key changes:
- Added WSL_LOG_DEBUG tracing to 11 HCS/HNS API wrapper functions for better diagnostics
- Refactored
GetProcessorFeatures()andGetSchemaVersion()to use static caching withstd::call_oncefor thread-safe one-time initialization - Improved error messages by standardizing format specifiers to
%lsand splitting long error messages into separate log calls
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@benhillis I've opened a new pull request, #13973, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@benhillis I've opened a new pull request, #13977, to work on those changes. Once the pull request is ready, I'll request review from you. |
src/windows/common/hcs.cpp
Outdated
| THROW_HR_MSG(static_cast<HRESULT>(response.Error->Error), "%hs", response.Error->ErrorMessage.c_str()); | ||
| } | ||
|
|
||
| g_processorFeatures = std::move(response.Response.ProcessorFeatures); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this doesn't actually move the structure since response is a const reference
d1d7aac to
f591079
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
This change adds additional debug-only tracing to help diagnose HCS / HNS issues.